#read in oil spill data
oil_spill <- read_sf(here("Oil_Spill_Incident_Tracking-shp"), layer = "Oil_Spill_Incident_Tracking") %>%
clean_names() %>%
rename(county = localecoun)
#check the refrence system
#st_crs(oil_spill)
#read in ca county boundaries
ca_county <- read_sf(here("ca_shape"), layer = "CA_Counties_TIGER2016"
) %>%
clean_names()
#st_crs(ca_county)
#transform to match
ca_county <- st_transform(ca_county, st_crs(oil_spill))
California Oil Spills: 2008
Let’s look at the California oilspills recorded in 2008. These spills include inland and marine oil spills. Each red do represents a recorded oil spill.
tmap_mode("view")
#tm_shape(oil_spill) +
#tm_dots("county")
tm_shape(ca_county) +
tm_fill("name", palette = "YlOrBr", show.legend = FALSE) +
tm_shape(oil_spill) +
tm_dots(aes(color = "darkred"))